<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header">
	<link rel="stylesheet" href="/js/plugins/layer/laydate/skins/default/laydate.css" />
</head>
<body class="gray-bg">
	<div class="wrapper wrapper-content ">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="signupForm">
						<input id="id" name="id" th:value="${order.id}"  type="hidden">
							<div class="form-group">	
								<label class="col-sm-3 control-label">单据编号：</label>
								<div class="col-sm-8">
									<input id="ordernumber" name="ordernumber" th:value="${order.ordernumber}" class="form-control" type="text" readonly>
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">折扣 1-100：</label>
								<div class="col-sm-8">
									<input id="orderdiscount" name="orderdiscount" th:value="${order.orderdiscount}" class="form-control" type="number" max="100" min="1">
								</div>
							</div>

							<div class="form-group">
								<input type="hidden" name="pId" id="pId" value="">
								<label class="col-sm-3 control-label">选择商品：</label>
								<div class="col-sm-8">
									<input class="form-control" type="text" onclick="opengoods()"
										   readonly="readonly" placeholder="选择商品">
								</div>
								<div>
									<table id="goodsTable" data-mobile-responsive="true">
									</table>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">是否送货：</label>
								<div class="col-sm-8">
									<input id="isdelivery" name="isdelivery" th:checked="${order.isdelivery}==1" type="checkbox" onclick="opendelivery(this)">送货
									<input type="hidden" value="" name="deliverytime" id="deliverytime">
									<input type="hidden" value="" name="customercontact" id="customercontact">
									<input type="hidden" value="" name="contactnumber" id="contactnumber">
									<input type="hidden" value="" name="deliveryaddress" id="deliveryaddress">
									<input type="hidden" value="" name="relevance" id="relevance">
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">销售类型：</label>
								<div class="col-sm-8">
									<input  name="typeofsale" th:checked="${order.typeofsale}==1"  type="radio" value="1"> 零售
									<input  name="typeofsale" th:checked="${order.typeofsale}==2"  type="radio" value="2"> 批发
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">经手人：</label>
								<div class="col-sm-8">
									<input id="handledbyname" name="handledbyname" th:value="${order.ename}" class="form-control" type="text" onclick="openemployee()" readonly>
									<input id="handledby" name="handledby" type="hidden" th:value="${order.handledby}">
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">业务日期：</label>
								<div class="col-sm-8">
									<input id="businessdate" name="businessdate" readonly th:value="${order.businessdate}==null?null:${#dates.format(order.businessdate,'yyyy-MM-dd')}" class="laydate-icon layer-date form-control" type="text">
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">客户：</label>
								<div class="col-sm-8">
									<input id="clientname" name="clientname" th:value="${order.cname}" class="form-control" type="text" onclick="openclient()" readonly>
									<input id="client" name="client" type="hidden" th:value="${order.client}">
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">订单状态：</label>
								<div class="col-sm-8">
									<input name="orderstatus" th:checked="${order.orderstatus}==1" type="radio">正常
									<input name="orderstatus" th:checked="${order.orderstatus}==0" type="radio">关闭
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">其他费用：</label>
								<div class="col-sm-8">
									<input id="otherexpenses" name="otherexpenses" th:value="${order.otherexpenses}" class="form-control" type="text">
								</div>
							</div>
							<div class="form-group">

								<label class="col-sm-3 control-label">结算方式：</label>
								<div class="col-sm-8">
									<input id="settlementaccountname" name="settlementaccountname" th:value="${order.dbank}" class="form-control" type="text" onclick="openbytype()" readonly>
									<input id="settlementaccount" name="settlementaccount" type="hidden" value="" th:value="${order.settlementaccount}">
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">总计金额：</label>
								<div class="col-sm-8">
									<input id="totalamount" name="totalamount" th:value="${order.totalamount}" class="form-control" type="text" readonly>
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">定金：</label>
								<div class="col-sm-8">
									<input id="orderearnest" name="orderearnest" th:value="${order.orderearnest}" class="form-control" type="text">
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">备注：</label>
								<div class="col-sm-8">
									<input id="ordercomment" name="ordercomment" th:value="${order.ordercomment}" class="form-control" type="text">
									<input id="isdelete" name="isdelete" th:value="${order.isdelete}" class="form-control" type="hidden">
								</div>
							</div>


							</div>
																					<div class="form-group">
								<div class="col-sm-8 col-sm-offset-3">
									<button type="submit" class="btn btn-primary">提交</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
	</div>
	</div>
	<div th:include="include::footer"></div>
	<script type="text/javascript" src="/js/appjs/sell/order/edit.js">
	</script>
	<script type="text/javascript" src="/js/plugins/layer/laydate/laydate.js" ></script>
</body>
</html>
